﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data.Sql;
using System.Configuration;

namespace Data_Load_Reapir_Wagon
{
    class DataBaseScript
    {
string queryString = "CREATE TABLE Wagon_Reapir" +  
        "(id UniqueIdentifier CONSTRAINT PKeyid PRIMARY KEY," +
        "NumberWagon INT,  RepairIdentifier INT,  typeOfRepair INT, Depo INT,NumberVU_23 INT,Road INT,Station INT,DateOfTransfer DATETIME,"+
        "fault INT, DateOfConstruction DATETIME,LastDepo INT,DateofLastDepo DATETIME,LastDepoofCapitalReapir INT,DateofLastCapitalRepair DATE"+
        "NumberVU_36 INT,DateOfBeginRepair DATE,DateofEndRepair DATE,Modernization INT,WagonStateINT)";  
    public DataBaseScript(){}
    private static void CreateTable(string queryString,string connectionString)
    {
        using (SqlConnection con = new SqlConnection(connectionString))
        {
            SqlCommand com = new SqlCommand(queryString, con);
            com.Connection.Open();
            com.ExecuteNonQuery();
        }
    }


    }
}
